﻿<%@ Import Namespace="ASPItalia.ModelVirtualCasting" %>
<%@ Import Namespace="ASPItalia.ModelVirtualCasting.MVC.Models" %>
<%@ Import Namespace="ASPItalia.ModelVirtualCasting.MVC.Utils" %>
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<HomepageViewModel>" %>

<asp:Content ID="indexTitle" ContentPlaceHolderID="TitleContent" runat="server">
    Home Page
</asp:Content>

<asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server">
    <h2><%= Html.Encode(ViewData["Message"]) %></h2>
    <p>
        <img src="../../Content/Logo.png" /><br />
        Qualche informazione su ModelVirtualCasting qui
    </p>
    
    <%-- Smarter version of Index.aspx
    <% Html.RenderPartial("NewsPanel", this.Model.News); %>
    <% Html.RenderPartial("ModelsPanel", this.Model.Models); %> --%>
	<div class="newsContainer">
		<% foreach (var news in this.Model.News) {%>
		<div class="singleNews">
			<h3>
				<%: news.NewsTitle %></h3>
			<p>
				<%: news.NewsText.Truncate(100) %></p>
			<%: Html.ActionLink("Leggi tutto...", "News", new { id = news.NewsID })%>
		</div>
		<%} %>
	</div>
	
	<div class="modelsCatalog">
		<div class="imageThumb">
			<% foreach (var item in this.Model.Models)
           { %>
			<%= Html.ImageActionLink(item.ImageUrl.ToThumbnailAbsoluteUrl(), item.NickName, "Profile", "Model", new { id = item.NickName }) %>
			<br />
			<%= Html.ActionLink(item.NickName, "Profile", "Model", new { id = item.NickName }, null)%>
			<br />
			<%= Html.ActionLink(item.CountryAndAge, "Profile", "Model", new { id = item.NickName }, null)%>
			<% } %>
		</div>
	</div>
</asp:Content>
